package com.vrv.app.main;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.view.Window;
import android.view.WindowManager;

import com.vrv.app.R;
import com.vrv.common.utils.ViewUtils;

/**
 * @Description 启动画面
 * @author 曹保利
 * @date
 */
public class SplashActivity extends Activity {

	/**
	 * 启动画面停留的时间
	 */
	private final int SPLASH_DISPLAY_LENGHT = 2000;
	private Context context = SplashActivity.this;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.splash);

		new Handler().postDelayed(new Runnable() {
			public void run() {
				ViewUtils.forward(context, MainActivity.class, true);
			}
		}, SPLASH_DISPLAY_LENGHT);
	}

}
